Edge-Matching and Jigsaw Puzzles are Really Hard
نویسندگان
چکیده
We prove the computational intractability of rotating and placing n square tiles into a 1 × n array such that adjacent tiles are compatible—either equal edge colors, as in edge-matching puzzles, or matching tab/pocket shapes, as in jigsaw puzzles. Beyond basic NP-hardness, we prove that it is NPhard even to approximately maximize the number of placed tiles (allowing blanks), while satisfying the compatibility constraint between nonblank tiles, within a factor of 0.9999999702. (On the other hand, there is an easy 1 2 -approximation.) This is the first (correct) proof of inapproximability for edge-matching and jigsaw puzzles. Along the way, we prove NP-hardness of distinguishing, for a directed graph on n nodes, between having a Hamiltonian path (length n − 1) and having at most 0.999999284(n − 1) edges that form a vertex-disjoint union of paths. We use this gap hardness and gap-preserving reductions to establish similar gap hardness for 1× n jigsaw and edge-matching puzzles.
منابع مشابه
Even $1 \times n$ Edge-Matching and Jigsaw Puzzles are Really Hard
We prove the computational intractability of rotating and placing n square tiles into a 1×n array such that adjacent tiles are compatible—either equal edge colors, as in edge-matching puzzles, or matching tab/pocket shapes, as in jigsaw puzzles. Beyond basic NP-hardness, we prove that it is NP-hard even to approximately maximize the number of placed tiles (allowing blanks), while satisfying the...
متن کاملEven 1×n Edge-Matching and Jigsaw Puzzles are Really Hard
Jigsaw puzzles [9] and edge-matching puzzles [5] are two ancient types of puzzle, going back to the 1760s and 1890s, respectively. Jigsaw puzzles involve fitting together a given set of pieces (usually via translation and rotation) into a desired shape (usually a rectangle), often revealing a known image or pattern. The pieces are typically squares with a pocket cut out of or a tab attached to ...
متن کاملNo Easy Puzzles: A Hardness Result for Jigsaw Puzzles
We show that solving jigsaw puzzles requires Θ(n ) edge matching comparisons, making them as hard as their trivial upper bound. This result generalises to puzzles of all shapes, and is applicable to both pictorial and apictorial puzzles.
متن کاملA Global Approach for Solving Edge-Matching Puzzles
We consider apictorial edge-matching puzzles, in which the goal is to arrange a collection of puzzle pieces with colored edges so that the colors match along the edges of adjacent pieces. We devise an algebraic representation for this problem and provide conditions under which it exactly characterizes a puzzle. Using the new representation, we recast the combinatorial, discrete problem of solvi...
متن کاملJigsaw Puzzles, Edge Matching, and Polyomino Packing: Connections and ComplexityA preliminary version of this paper was presented at the Gathering for Gardner 6, Atlanta, March 2004
We show that jigsaw puzzles, edge-matching puzzles, and polyomino packing puzzles are all NP-complete. Furthermore, we show direct equivalences between these three types of puzzles: any puzzle of one type can be converted into an equivalent puzzle of any other type.
متن کامل